package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
* Created by Mybatis Generator on 2023/12/15
*/
@Data
@ApiModel("关联 benefit 的用户")
@Table(name = "tbl_plan_benefit_member")
@NoArgsConstructor
@AllArgsConstructor
public class TblPlanBenefitMember extends BaseEntity {
    @Column(name = "benefit_id")
    private String benefitId;

    @Column(name = "mem_id")
    private String memId;


    @ApiModelProperty("配套的员工id")
    @Column(name = "insurer_member_id")
    private String insurerMemberId;

    @Column(name = "identifier_inputted_by_patient")
    private String identifierInputtedByPatient;

    /**
     * 是否已激活，主要用于使用email时的校验
     */
    @ApiModelProperty("是否已激活，主要用于使用email时的校验")
    private Integer activated;

    private Integer status;

    /**
     * SUB 家属填写的 identifier
     */
    @Column(name = "dependant_inputted_by")
    @ApiModelProperty("SUB 家属填写的 identifier")
    private String dependantInputtedBy;

    @Column(name = "family_id")
    private String familyId;

    @Column(name = "family_status")
    private Integer familyStatus;

    @Column(name = "active_code")
    private String activeCode;

    /**
     * sintel_order的deeplink id
     */
    @ApiModelProperty("sintel_order的deeplink id")
    private String correlationid;


    /**
     * AIA corporate和AIA HS会使用member中的额度来做限制，其余的使用tbl_plan_benefit_service中的设置(
     * 包括这些字段：
     * max_amount_per_year,
     * max_amount_per_limit,
     * visit_count_limit,
     * co_payment_amount,
     * reimbursement_percentage,
     * renewal_date,
     * max_amount_per_limit_label,
     * co_payment_amount_label
     * )
     */
    @ApiModelProperty("AIA corporate和AIA HS会使用member中的额度来做限制，其余的使用tbl_plan_benefit_service中的设置")
    @Column(name = "max_amount_per_year")
    private BigDecimal maxAmountPerYear;

    @Column(name = "max_amount_per_limit")
    private BigDecimal maxAmountPerLimit;

    @Column(name = "visit_count_limit")
    private Integer visitCountLimit;

    @Column(name = "co_payment_amount")
    private BigDecimal coPaymentAmount;

    /**
     * 最大报销百分比
     */
    @Column(name = "reimbursement_percentage")
    @ApiModelProperty("最大报销百分比")
    private BigDecimal reimbursementPercentage;

    @Column(name = "renewal_date")
    private String renewalDate;

    @Column(name = "max_amount_per_limit_label")
    private String maxAmountPerLimitLabel;

    @Column(name = "co_payment_amount_label")
    private String coPaymentAmountLabel;


    /**
     * 以下为原tbl_member_aia_corporate的字段
     */
    @Column(name = "aia_corporate_id")
    private String aiaCorporateId;

    private String suboffcode;

    @Column(name = "aia_corporate_benefit_id")
    private String aiaCorporateBenefitId;

    private String identifier;

    private String polno;

    private String suboffname;

    private String memid;

    private Date employmentdate;

    private Short depcode;

    private String relationship;

    private String empmemid;

    private String empnric;

    private String empcertno;

    private String empfirstname;

    private String emplastname;

    private Date poldtfr;

    private Date poldtto;

    private String mememailaddr;

    private String benlncode;

    private String bencode;

    private String benefitdesc;

    private BigDecimal maxamt;

    private String amtunit;

    private Integer maxservicecount;

    private String countunit;

    private BigDecimal reimbursementpercentage;

    private BigDecimal copayment;

    private Integer lifetimemax;

    private BigDecimal maxamtperyear;

    private BigDecimal claimbalance;

    @Column(name = "plan_maxamtperyear")
    private BigDecimal planMaxamtperyear;

    private Integer visitbalance;

    @Column(name = "create_on")
    private Date createOn;

    private Integer type;

    @Column(name = "is_deleted")
    private Boolean isDeleted;

    @Column(name = "deleted_at")
    private Date deletedAt;

    @Column(name = "deleted_by")
    private String deletedBy;

    @Column(name = "update_on")
    private Date updateOn;

    private String prodcode;

    @Column(name = "need_to_update")
    private Boolean needToUpdate;

    @Column(name = "platform_type")
    private Integer platformType;

    private String currency;

    /**
     * 2024-02-04  新加字段 生日  删除tbl_Aia_Corporate_Mapping_ID,将原有用到的地方替换为tbl_Member_Aia_Corporate
     * 具体字段对应关系如下:
     * member_value -> memid
     * mapping_id -> empmemid
     * corporate_id -> suboffname
     * branch_code -> suboffcode
     * nik - drop
     * division - drop
     * bank_name_and_account_no - drop
     * languiage - drop
     * type_of_work - drop
     * race - drop
     * policy_number -> polno
     * relationship -> relationship
     * member_effective_date -> poldtfr
     * member_expiry_date ->poldtto
     * internal_use_1 - internal_use_6 - drop
     * name -> empfirstname
     * passport_no - drop
     * passport_country - drop
     * date_of_birth -> DOB (add new column in tbl_plan_benefit_member)
     * plan_id -> benlncode
     *
     */
    private Date dob;

    /**
     * 以下为原tbl_aia_corporate_mapping_id用到的字段
     */

    @Column(name = "record_mode")
    private String recordMode;

    @Column(name = "record_type")
    private String recordType;

    @Column(name = "payor_id")
    private String payorId;

    @Column(name = "member_code")
    private String memberCode;

    @Column(name = "admedika_member_id")
    private String admedikaMemId;

    @Column(name = "marital_status")
    private String maritalStatus;

    private String city;

    private String state;

    @Column(name = "post_code")
    private String postCode;

    @Column(name = "telephone_office")
    private String telephoneOffice;

    @Column(name = "telephone_res")
    private String telephoneRes;

    @Column(name = "telephone_mobile")
    private String telephoneMobile;

    private String nric;

    private String sex;

    @Column(name = "employment_status")
    private String employmentStatus;

    @Column(name = "date_terminated")
    private String dateTerminated;

    @Column(name = "pre_existing")
    private String preExisting;

    private String remarks;

    @Column(name = "pre_existing")
    private String memberSince;

    @Column(name = "policy_in_force")
    private String policyInForce;

    @Column(name = "policy_suspended")
    private String policySuspended;

    @Column(name = "renewal_activation_date")
    private String renewalActivationDate;

    @Column(name = "option_mode")
    private String optionMode;

    /**
     * 以下为原tbl_member_aia_profile使用字段
     */
    @Column(name = "patient_input")
    @ApiModelProperty("using this field to bind with the beneift (identifer or memid)")
    private String patientInput;

}
